<%-- 
    Document   : fileManage
    Created on : 2009-2-22, 20:09:12
    Author     : cyp
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="sunsite.tools.*,java.util.*,sunsite.service.*" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>文件管理</title>
        <script>
            function Submit(object)
            {   var type = document.getElementById('type');
                type.value=object;
                if(object=='addBtn'){
                    type.value='rtypeitem';
                }
                if(object=='findBtn'){
                    type.value='find';
                }
                document.forms[0].submit();
            }
        </script>
    </head>
    <body>
        
        <form action="fileManage.action" method="POST">
            <input type="hidden" name="type" value="submit"/>
            <table width="80%">
                <tr>
                    <td><s:select name="rtp" list="Resource_tpList"  headerKey="0" headerValue="请选择" listKey="tpId" listValue="tpName" theme="simple" onchange="Submit(this.id)" ></s:select></td>
                    <td><s:select name="rcatelog" list="Resource_catelogList" headerKey="0" headerValue="请选择" listKey="catId" listValue="catName" theme="simple" onchange="Submit(this.id)"></s:select></td>
                    <td><s:select name="rtype" list="Resource_typeList" headerKey="0" headerValue="请选择" listKey="typeId" listValue="typeName" theme="simple" onchange="Submit(this.id)"></s:select></td>
                    <td><input type="button" id="findBtn" value="查找" onclick="Submit(this.id)"/></td>
                    <td><input name="rtypeitem" type="text" class="textbox" theme="simple"/><input type="button" id="addBtn" value="增加" onclick="Submit(this.id)"/></td>
                </tr>
            </table>
            <table width="80%">
                <tr>
                    <td>资源ID</td>
                    <td>资源名称</td>
                    <td>资源地址</td>
                    <td>资源状态</td>
                    <td>上传时间</td>
                    <td>最后修改</td>
                    <td>描述</td>
                    <td>上传用户ID</td>
                    <td colspan="2">相关操作</td>
                </tr>
                <s:iterator value="ResourceList" status="stat">
                    <tr>
                        <td><s:property value="resId" /></td>
                        <td><s:property value="resName" /></td>
                        <td><s:property value="address" /></td>
                        <td><s:property value="status" /></td>
                        <td><s:property value="uploadTime" /></td>
                        <td><s:property value="lastUpdate" /></td>
                        <td><s:property value="discription" /></td>
                        <td><s:property value="usr.userId" /></td>
                        <td><a href="fileModify.action?type=modify&&resId=<s:property value="resId"/>">修改</a></td>
                        <td><a href="fileManage.action?type=delete&&resId=<s:property value="resId" />">删除</a></td>
                    </tr>
                </s:iterator>
                <tr>
                    <td colspan="10" align="right"><%@ include file = "pagination.jsp" %></td>
                </tr>
            </table>
        </form>
    </body>
</html>
